package org.springblade.modules.repair.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @Description 审批流程类型,对应blade_business_approve表type
 * @Author ysq
 * @Date 2021/12/7
 **/
@Getter
@AllArgsConstructor
public enum ApproveTypeEnum {

	DATA_ALTER(0,"资料更改"),

	MAKE_UP_CARD_APPLY(1,"补卡申请"),

	LEAVE_APPLY(2,"请假申请"),

	EXCHANGE_LEAVE_APPLY(3,"调休申请"),

	EXCHANGE_ORDER_ALTER(4,"转单申请"),

	ACCESSORY_APPLY(5,"配件申请"),

	MALFUNCTION_APPLY(6,"报障审批");

    final int id;
	final String name;

	public static List<HashMap<String,Object>> list(){
		ApproveTypeEnum[] approveTypeEnums = ApproveTypeEnum.values();
		List<HashMap<String,Object>> approveTypes = new ArrayList<>(6);
		for (ApproveTypeEnum approveTypeEnum : approveTypeEnums) {
			HashMap<String,Object> approveType = new HashMap<>(2);
			approveType.put("id",approveTypeEnum.getId());
			approveType.put("name",approveTypeEnum.getName());
			approveTypes.add(approveType);
		}
		return approveTypes;
	}

}
